/**
 * @Author: 陈瑞鹏
 * @Date:   2022-10-21 10:06:17
 * @Last Modified by:   陈瑞鹏
 * @Last Modified time: 2022-10-21 10:13:07
 */
import mongoose from 'mongoose';

const Schema = mongoose.Schema;
const RandTaskSchema: mongoose.Schema = new Schema({
  roleId: { type: Number, desc: "角色id", index: true },
  id: { type: Number, desc: "任务id", index: true },
  name: { type: String, desc: "任务名称" },
  target: { type: Number, desc: "目标" },
  progress: { type: Number, desc: "进度", default: 0 },
  isReceive: { type: Boolean, desc: "是否领取", default: false },
}, { versionKey: false }).index({ roleId: 1, id: 1 });

const RandTask = mongoose.model("RandTask", RandTaskSchema);
export default RandTask;